diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures.zip index e96857ce2..e5758626b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/app.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/app.js index 4ee58b84c..6b0a3e17c 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/app.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/app.js @@ -47,9 +47,9 @@ angular.module('GanttChartViewSample', ['DlhSoft.ProjectData.GanttChart.Directiv // alternativeItemStyle: 'background-color: #f9f9f9', alternativeChartItemStyle: 'fill: #f9f9f9', // itemTemplate: function(item) { // var toolTip = document.createElementNS('http://www.w3.org/2000/svg', 'title'); - // var toolTipContent = item.content + ' • ' + 'Start: ' + item.start.toLocaleString(); + // var toolTipContent = item.content + '\n' + 'Start: ' + item.start.toLocaleString(); // if (!item.isMilestone) - // toolTipContent += ' • ' + 'Finish: ' + item.finish.toLocaleString(); + // toolTipContent += '\n' + 'Finish: ' + item.finish.toLocaleString(); // toolTip.appendChild(document.createTextNode(toolTipContent)); // return toolTip; // }, diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage.zip index 7c708fcc9..01f696175 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration.zip index 35efc5a57..f1bbe6c47 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem.zip index fb139e878..d112bd7e4 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage.zip index b55a08153..1e2abc848 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration.zip index 5a455dbbc..8577aae67 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage.zip index e53e0a2c7..7ff158dae 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration.zip index b0ffa8498..9cba99327 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage.zip index 452ed326e..29e03ccec 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration.zip index d9c16573e..530270896 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources.zip index 0978c743c..5c5815390 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate.zip index a4f5bc416..91e66a859 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL.zip index 032bfd149..2354caaef 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling.zip index 77a2c6632..44a4b8b5d 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline.zip index a11b56c6a..0849560b0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales.zip index 55fdd6593..d564ec53a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications.zip index c4c591292..419beef71 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns.zip index 5e7d25e51..f86ff7258 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus.zip index fdb3cf27e..ad6424c6e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule.zip index 568ff77e6..e215ab5c3 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath.zip index 8eb844d5f..f99a04c17 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale.zip index 14ac4f357..78a271a85 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules.zip index a9d56ca7b..126651a00 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate.zip index cf6e22869..bd2acad6c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats.zip index e4ecda3e3..9c7d51cba 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF.zip index b2c6e43b3..7eb95e2de 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering.zip index 14dfc7e42..b091698e5 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization.zip index 635f49bd8..c6797072b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions.zip index 87164a637..ec52867a5 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures.zip index ca7b98ef3..518f23659 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/app.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/app.js index d3ff6b8fe..26ad09a41 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/app.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/app.js @@ -59,9 +59,9 @@ var settings = { // Optionally, set item template used when displaying task bar tool tips in the chart area. // itemTemplate: function (item) { // var toolTip = document.createElementNS('http://www.w3.org/2000/svg', 'title'); - // var toolTipContent = item.content + ' • ' + 'Start: ' + item.start.toLocaleString(); + // var toolTipContent = item.content + '\n' + 'Start: ' + item.start.toLocaleString(); // if (!item.isMilestone) - // toolTipContent += ' • ' + 'Finish: ' + item.finish.toLocaleString(); + // toolTipContent += '\n' + 'Finish: ' + item.finish.toLocaleString(); // toolTip.appendChild(document.createTextNode(toolTipContent)); // return toolTip; // }, diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources.zip index 0c927a960..ad300592c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale.zip index 97888e2c4..b24059bf3 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents.zip index 85bb3895c..86efbe629 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown.zip index a70c88c4d..2846028f4 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem.zip index 32f359690..9575ca8e8 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance.zip index 469a31e1f..a6776a671 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing.zip index daf2e8104..c4216184c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml.zip index 068e41de3..f7edf3b50 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings.zip index 887d82b01..41978cad0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes.zip index f099ae777..67d1255f1 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays.zip index b831bfb69..d196c4666 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses.zip index 5b439a7bf..be158407a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling.zip index 9ae1939d4..467e5ff1f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints.zip index 338c4d3cd..d4c9b758b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo.zip index 059f8bec0..662ca11f5 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS.zip index a6591803b..1a89b7199 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations.zip index 1955598c5..e448e8f18 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel.zip index 730c90779..a830c7dde 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales.zip index 0657700e2..ce215ed20 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration.zip index a95a3d0ed..9607b2a2a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures.zip index 3fcd5c6dd..0977fa436 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/app.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/app.js index d8a1f6347..937f323a4 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/app.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/app.js @@ -45,7 +45,7 @@ var settings = { // Optionally, set item template used when displaying task bar tool tips in the chart area. // itemTemplate: function (item) { // var toolTip = document.createElementNS('http://www.w3.org/2000/svg', 'title'); - // var toolTipContent = item.content + ' • ' + item.start.toLocaleString() + '-' + 'Finish: ' + item.finish.toLocaleString(); + // var toolTipContent = item.content + '\n' + item.start.toLocaleString() + '-' + 'Finish: ' + item.finish.toLocaleString(); // toolTip.appendChild(document.createTextNode(toolTipContent)); // return toolTip; // }, diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing.zip index e6128561b..387eac754 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem.zip index 9c5524da5..208a2703a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/app.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/app.js index 08c2ed490..668a98725 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/app.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/app.js @@ -36,7 +36,7 @@ var settings = { // Optionally, set item template used when displaying task bar tool tips in the chart area. // itemTemplate: function (item) { // var toolTip = document.createElementNS('http://www.w3.org/2000/svg', 'title'); - // var toolTipContent = item.content + ' • ' + item.start.toLocaleString() + '-' + 'Finish: ' + item.finish.toLocaleString(); + // var toolTipContent = item.content + '\n' + item.start.toLocaleString() + '-' + 'Finish: ' + item.finish.toLocaleString(); // toolTip.appendChild(document.createTextNode(toolTipContent)); // return toolTip; // }, diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling.zip index d25e0afc7..a8ef9a49e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration.zip index 8f6b55701..ba6e3f7c2 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures.zip index 5cc1d566e..ac22b80ca 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/app.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/app.js index 68591a370..fafbf4414 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/app.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/app.js @@ -40,7 +40,7 @@ var settings = { // Optionally, set item template used when displaying task bar tool tips in the chart area. // itemTemplate: function (item) { // var toolTip = document.createElementNS('http://www.w3.org/2000/svg', 'title'); - // var toolTipContent = item.content + ' • ' + item.start.toLocaleString() + '-' + 'Finish: ' + item.finish.toLocaleString(); + // var toolTipContent = item.content + '\n' + item.start.toLocaleString() + '-' + 'Finish: ' + item.finish.toLocaleString(); // toolTip.appendChild(document.createTextNode(toolTipContent)); // return toolTip; // }, diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing.zip index bbb173949..8687940a6 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling.zip index f4e37b071..1ff0f7f5b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration.zip index db71c6a6f..fdcc086ef 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures.zip index 6d6fcca8b..6e9b1119f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing.zip index 789b8ccdc..93572d1f5 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling.zip index 4ad8eb59b..4076a626a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks.zip index 72e13dfe9..d23026082 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales.zip index 5e99e12dd..94a6fb75a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications.zip index 944b8d0fe..544a7460a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns.zip index fe88361a0..cf2c08196 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule.zip index 1c7d3d112..1981be89d 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale.zip index 786c1d009..04d8a43de 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate.zip index 6db3718ce..dc7cc3bf7 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering.zip index 72613b4ef..8a9e5f60e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration.zip index f754543f1..fbedd9a45 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy.zip index 46591f033..84774ddd0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures.zip index ae7f7f741..e5f59bc2f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/app.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/app.js index 4b1848547..a072e2f6f 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/app.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/app.js @@ -47,9 +47,9 @@ var settings = { // Optionally, set item template used when displaying task bar tool tips in the chart area. // itemTemplate: function (item) { // var toolTip = document.createElementNS('http://www.w3.org/2000/svg', 'title'); - // var toolTipContent = item.content + ' • ' + 'Start: ' + item.start.toLocaleString(); + // var toolTipContent = item.content + '\n' + 'Start: ' + item.start.toLocaleString(); // if (!item.isMilestone) - // toolTipContent += ' • ' + 'Finish: ' + item.finish.toLocaleString(); + // toolTipContent += '\n' + 'Finish: ' + item.finish.toLocaleString(); // toolTip.appendChild(document.createTextNode(toolTipContent)); // return toolTip; // }, diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents.zip index e5c4c75ad..36bda1c6b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing.zip index 0106ada05..afa961b3b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings.zip index 81ea83b9c..5fb99f7de 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus.zip index 6c61e699a..240ff2a2e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling.zip index 53fd7f137..f228cdbc5 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays.zip index 34f8ca3c5..1eeaef688 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling.zip index 4640c3fa7..c8bfed9bd 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel.zip index 0976afa13..3b36f5102 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources.zip index 8ce6ad724..e889d2eb0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate.zip index 0fa3b8cf3..0c5bdb47c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling.zip index 8e3d0dd1c..e9d26e23c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline.zip index 469b7c8fd..da8f24dd6 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales.zip index 6326f7d15..53fd3d2e9 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications.zip index 5953c6ae2..bc37236ec 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns.zip index 85403b0da..eb05dbd84 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus.zip index e9019ef4a..d6223c9ca 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule.zip index dd6c47d44..bebe55815 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath.zip index e347bd8af..d1565ac6a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale.zip index 135babca3..e47046609 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules.zip index 1841f8618..5603d47ed 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate.zip index cbf11350a..62b3e3595 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats.zip index 67a3d1f7b..10d7290a2 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF.zip index 926274208..4ed02b0cd 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering.zip index 61b55863d..4d29efdd8 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions.zip index 952e12dc8..2912aeca9 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures.zip index bab90d599..00b25387d 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/app.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/app.js index 47903c002..e1e9e66ec 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/app.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/app.js @@ -63,9 +63,9 @@ var settings = { // Optionally, set item template used when displaying task bar tool tips in the chart area. // itemTemplate: function (item) { // var toolTip = document.createElementNS('http://www.w3.org/2000/svg', 'title'); - // var toolTipContent = item.content + ' • ' + 'Start: ' + item.start.toLocaleString(); + // var toolTipContent = item.content + '\n' + 'Start: ' + item.start.toLocaleString(); // if (!item.isMilestone) - // toolTipContent += ' • ' + 'Finish: ' + item.finish.toLocaleString(); + // toolTipContent += '\n' + 'Finish: ' + item.finish.toLocaleString(); // toolTip.appendChild(document.createTextNode(toolTipContent)); // return toolTip; // }, diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources.zip index 852b6fd21..b59b67811 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale.zip index 28f248019..01bd45302 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents.zip index 929192a07..4f29f009f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown.zip index 447fe2491..00e9b4155 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem.zip index 7ecd0c818..0d0e0360c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance.zip index 1103d7c60..38e0478c3 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing.zip index dfa30d3b9..4f808e2cc 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml.zip index 690e088de..372e31d98 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings.zip index 7b84b8ec7..89f444ca7 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes.zip index 130f1eebe..aaf628ddc 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays.zip index a49fad8ae..17c1492aa 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses.zip index b7be9759a..c048122e3 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling.zip index 8999535dd..f0cacee4a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints.zip index 39df9713b..a294ff3bc 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo.zip index 57d07f6da..9b105ffae 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS.zip index 29e8968dd..7cee1deeb 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations.zip index f48fe1043..b823699d0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel.zip index fde348833..6e421b831 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage.zip index d9ee151e6..c8da9d62d 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales.zip index 75ae6df28..2d0956f85 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration.zip index 3084e934c..279e6adec 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing.zip index e187c2d48..efcdd7bea 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem.zip index be0512e5a..10a8b8a7e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling.zip index 5b654cbd7..354c1042c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage.zip index 59de90ab9..158829d9d 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration.zip index 9ff51d98f..3b5efffbb 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing.zip index d0dde847c..e1ad150bd 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling.zip index e3d888256..91e51d4b5 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage.zip index 82eb71d59..b44ec6f7d 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration.zip index 45dbf95a7..384ccf5ed 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing.zip index 61277b9ea..146f6f8ef 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling.zip index e58becf5e..d15c46e93 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks.zip index 7198fc6b5..ee0b8144f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage.zip index 7501c1b9d..57e063d06 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales.zip index e8536bd56..23b7cae01 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications.zip index b22bb0af1..999c6a20c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns.zip index 9418f839d..cf5b9de53 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule.zip index 0b5afd3d5..0760ef988 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale.zip index 377dc9090..ccd639cc2 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate.zip index 917df3f1d..9b8ed8303 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering.zip index bf9d0dc61..09fc26d88 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration.zip index 8216ee61d..e7af40140 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy.zip index c7a865778..37d650a7a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents.zip index 1673dcb31..1d9c42bd0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing.zip index e04980c9e..cc82323f6 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings.zip index fc0ba1e74..087518aa1 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus.zip index ed033818f..eda7bad04 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling.zip index 6bb2c1b3e..77ab23365 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays.zip index 771682bb9..10ae07195 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling.zip index fde5bd518..8860389a5 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel.zip index ab3a6c6d6..7e8f7f96b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/templates.js index b6da178c9..24bad1431 100644 --- a/GanttChartHyperLibraryDemos/Demos/Samples/templates.js +++ b/GanttChartHyperLibraryDemos/Demos/Samples/templates.js @@ -542,43 +542,42 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (typeof item.loadChartView === undefinedType) { if (typeof item.scheduleChartView === undefinedType && item.parent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); } if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); } if (item.hasChildren) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Children: ' + item.children.length + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); } - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); } if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); } if (!item.isMilestone) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); if (settings.isTaskCompletedEffortVisible) { var completion = ganttChartView.getItemCompletion(item); if (!isNaN(completion)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); } } } if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { - toolTip.appendChild(document.createElement('br')); + toolTip.appendChild(document.createTextNode('\n')); var predecessorsString = ''; for (var i = 0; i < item.predecessors.length; i++) { var predecessor = item.predecessors[i]; @@ -590,12 +589,12 @@ function initializeGanttChartTemplates(settings, theme) { if (predecessor.dependencyType) predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; } - toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString + ' ')); + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); } } else if (!isNaN(item.units)) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '% ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); } } return toolTip; @@ -605,14 +604,13 @@ function initializeGanttChartTemplates(settings, theme) { var toolTip = document.createElementNS(svgns, 'title'); toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { - toolTip.appendChild(document.createTextNode(' ')); if (predecessorItem.dependencyType) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType) + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); } if (predecessorItem.lag) { - toolTip.appendChild(document.createElement('br')); - toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h' + ' ')); + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); } } return toolTip; diff --git a/GanttChartHyperLibraryDemos/Demos/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js index 715df9b59..da36f48a6 100644 --- a/GanttChartHyperLibraryDemos/Demos/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js +++ b/GanttChartHyperLibraryDemos/Demos/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -1,4 +1,4 @@ -var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.0",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.14.1",copyright:"Copyright \u00a9 2012-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); DlhSoft.buildReleaseDate=function(O,K,X){O=new Date(O,K-1,X);return O>DlhSoft.buildReleaseDate?O:DlhSoft.buildReleaseDate}(2019,8,17);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var O=_0x5c25[1],K=_0x5c25[2],X=[],ca=[],na=_0x5c25[3],fa=function($,P){if(typeof $!==K||typeof P!==K)return!1;if(P==na)return!0;var W=P[_0x5c25[11]](_0x5c25[10]);if(0<=W){var Q=P[_0x5c25[12]](0,W),I,G=Q[_0x5c25[11]](_0x5c25[10]);if(0<=G)try{I=new Date(parseInt(Q[_0x5c25[12]](G+1)))}catch(V){}typeof I===O&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;Q=Q+_0x5c25[10]+$;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);Q=I.toString(16)[_0x5c25[16]]();W=P[_0x5c25[12]](W+1);if(Q==W)return!0}return!1},S=function(K,P,W,Q,I){var G=_0x5c25[17],V=_0x5c25[18],U=typeof ComponentSource===O||!ComponentSource?V+_0x5c25[19]+Q+_0x5c25[20]+I:_0x5c25[21],S=Q+_0x5c25[22]+I+_0x5c25[23],N=_0x5c25[24],r=_0x5c25[25],k=_0x5c25[26];setTimeout(function(){var j=K[_0x5c25[27]],m=j[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var p=j[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30], @@ -216,83 +216,83 @@ a}va(c.chartContent,wa(b,e));Na(b,c.chartContent,e);bb(b,e)&&Qa(b);Ra(d,b,c,e);x "BlackGradient");e.setAttribute("x1","0%");e.setAttribute("y1","0%");e.setAttribute("x2","0%");e.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");g=b.createElementNS("http://www.w3.org/2000/svg","stop");g.setAttribute("offset","10%");g.setAttribute("style","stop-color: White");l=b.createElementNS("http://www.w3.org/2000/svg","stop");l.setAttribute("offset","20%");l.setAttribute("style","stop-color: Gray"); var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","60%");h.setAttribute("style","stop-color: Black");e.appendChild(f);e.appendChild(g);e.appendChild(l);e.appendChild(h);c.appendChild(e);e=b.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id","ArrowMarker");e.setAttribute("viewBox","0 0 10 10");e.setAttribute("refX","0");e.setAttribute("refY","5");e.setAttribute("markerUnits","strokeWidth");e.setAttribute("markerWidth","5");e.setAttribute("markerHeight", "4");e.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(d.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d","M 0 0 L 10 5 L 0 10 z");e.appendChild(b);c.appendChild(e);return c}},Ib=function(a){return function(d){var c=d.ganttChartView,b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,d.content));if(typeof a.areToolTipsSimplified=== -"undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Parent: "+d.parent.content+" "))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content+" "))}if(d.hasChildren){e.appendChild(b.createElement("br")); -e.appendChild(b.createTextNode("Children: "+d.children.length+" "))}e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))+" "));if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))+" "))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent+ -" "))}if(!d.isMilestone){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h "));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"% "))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createElement("br"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&&(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c+" "))}}else if(!isNaN(d.units)){e.appendChild(b.createElement("br"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"% "))}}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish, -b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"||d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d= -a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!== -"undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish,f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class", -o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle;typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius); -var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x", -t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height",f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle; -if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u=b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0, -o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly||h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u); -var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width",8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight); -q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& -!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r", -f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g,e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y", -f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u=b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg", -"line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2",f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg", -"polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1-f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+ -w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx", -o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r",f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d, -c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o= -b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class",o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass; -if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg", -"rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height",o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style", -"fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}},Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"|| -b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start, -f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&&(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg", -"path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class",h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b, -c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){e.appendChild(b.createTextNode(" "));if(c.dependencyType){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Type: "+Zb(c.dependencyType)+" "))}if(c.lag){e.appendChild(b.createElement("br"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h "))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF"; -default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start= -M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem=== -"undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish= -a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&&h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/ -g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"?typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a, -a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone, -true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish= -M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a); -else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e< -c.length;e++){var l=sb(c[e]);for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children;for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&& -d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c=0;cg||!b&&a==g)if(b)a=g;else{e=ba(e);a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f- -a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d,a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a), -c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a= -a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e;d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key; -c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition= -g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); -t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0, -d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+ -4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation= -true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, -"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true,false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+ -" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e, -h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true,E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish, -n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup",function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start", -true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency"; -h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ -o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button== -0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +"undefined"||!a.areToolTipsSimplified)if(typeof d.loadChartView==="undefined"){if(typeof d.scheduleChartView==="undefined"&&d.parent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Parent: "+d.parent.content))}if(typeof d.scheduleChartView!=="undefined"&&d.scheduleChartItem){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Row: "+d.scheduleChartItem.content))}if(d.hasChildren){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Children: "+ +d.children.length))}e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode((!d.isMilestone?"Start: ":"")+a.dateTimeFormatter(N(d.start))));if(!d.isMilestone){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(N(d.finish))))}if(a.areTaskAssignmentsVisible&&d.assignmentsContent){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Assignments: "+d.assignmentsContent))}if(!d.isMilestone){e.appendChild(b.createTextNode("\n")); +e.appendChild(b.createTextNode("Effort: "+c.getItemTotalEffort(d)/36E5+"h"));if(a.isTaskCompletedEffortVisible){c=c.getItemCompletion(d);if(!isNaN(c)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Completed: "+Math.round(c*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&d.predecessors&&d.predecessors.length>0){e.appendChild(b.createTextNode("\n"));for(var c="",f=0;f0&&(c=c+", ");c=c+g.item.content;g.dependencyType&& +(c=c+(" ("+Zb(g.dependencyType)+")"))}}e.appendChild(b.createTextNode("Predecessors: "+c))}}else if(!isNaN(d.units)){e.appendChild(b.createTextNode("\n"));e.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return e}},Jb=function(a){return function(d){var c=d.ganttChartView,b=typeof a!=="undefined"?a:c.settings,c=c.ownerDocument,e=c.createElementNS("http://www.w3.org/2000/svg","text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled==="undefined"|| +d.isSummaryEnabled))f=f+b.barHeight/2;e.setAttribute("x",f+7);e.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d==="undefined"&&(d="");e.appendChild(c.createTextNode(d));typeof b.assignmentsClass!=="undefined"?e.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!=="undefined"&&e.setAttribute("style",b.assignmentsStyle);return e}},pb=function(a){var d=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea==="undefined")a.chartItemArea= +d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Fb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"&&typeof b.baselineFinish!=="undefined"){var o=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),o+4),t=l.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",o);t.setAttribute("y",f.barMargin/2);t.setAttribute("width",Math.max(0,n-o-1));t.setAttribute("height",f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")t.setAttribute("class",o);else{o=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")o=b.baselineBarStyle; +typeof o!=="undefined"&&t.setAttribute("style",o)}h.appendChild(t)}var t=H(b.start,f),o=Math.max(H(b.finish,f),t+4),n=H(b.completedFinish,f),w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);var u=f.standardBarClass;if(typeof b.standardBarClass!=="undefined")u=b.standardBarClass;if(typeof b.barClass!== +"undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardBarStyle;if(typeof b.standardBarStyle!=="undefined")u=b.standardBarStyle;if(typeof b.barStyle!=="undefined")u=b.barStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w);if(f.isTaskCompletedEffortVisible){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin+f.completedBarMargin);w.setAttribute("width",Math.max(0,n-t-1));w.setAttribute("height", +f.completedBarHeight);w.setAttribute("rx",f.completedBarCornerRadius);w.setAttribute("ry",f.completedBarCornerRadius);u=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!=="undefined")u=b.standardCompletedBarClass;if(typeof b.completedBarClass!=="undefined")u=b.completedBarClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{u=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!=="undefined")u=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!=="undefined")u= +b.completedBarStyle;typeof u!=="undefined"&&w.setAttribute("style",u)}h.appendChild(w)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",t);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,o-t-1));w.setAttribute("height",f.barHeight);w.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");f.isTaskStartReadOnly|| +h.appendChild(w);u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",t-4);u.setAttribute("y",f.barMargin);u.setAttribute("width",4);u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&h.appendChild(u);var D=l.createElementNS("http://www.w3.org/2000/svg","rect");D.setAttribute("x",o-4);D.setAttribute("y",f.barMargin);D.setAttribute("width", +8);D.setAttribute("height",f.barHeight);D.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&h.appendChild(D);var q=l.createElementNS("http://www.w3.org/2000/svg","rect");q.setAttribute("x",n-2);q.setAttribute("y",f.barMargin);q.setAttribute("width",6);q.setAttribute("height",f.barHeight);q.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&& +f.interaction!="TouchEnabled"){h.appendChild(q);var k=l.createElementNS("http://www.w3.org/2000/svg","title"),j=typeof f.areToolTipsSimplified==="undefined"||!f.areToolTipsSimplified?e.getItemCompletion(b):NaN;k.appendChild(G(l,!isNaN(j)?Math.round(j*1E4)/100+"%":""));q.appendChild(k)}qb(w,u,D,q,b,t,o,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){n=l.createElementNS("http://www.w3.org/2000/svg", +"circle");n.setAttribute("cx",t);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(n)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",o-2);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,n,h,b,f.barMargin+f.barHeight/2,o-2,t,g, +e,f)}}return h}},Gb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f=typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b),o=H(b.start,f),n=H(b.finish,f),t=f.barHeight*2.15/3,w=l.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o);w.setAttribute("y",f.barMargin);w.setAttribute("width",Math.max(0,n-o-1));w.setAttribute("height",t);var u=f.summaryBarClass;if(typeof b.summaryBarClass!=="undefined")u= +b.summaryBarClass;if(typeof b.barClass!=="undefined")u=b.barClass;if(typeof u!=="undefined")w.setAttribute("class",u);else{var D=f.summaryBarStyle;if(typeof b.summaryBarStyle!=="undefined")D=b.summaryBarStyle;if(typeof b.barStyle!=="undefined")D=b.barStyle;typeof D!=="undefined"&&w.setAttribute("style",D)}h.appendChild(w);if(!b.isExpanded){w=l.createElementNS("http://www.w3.org/2000/svg","line");w.setAttribute("x1",o);w.setAttribute("y1",f.barMargin+t+2.5);w.setAttribute("x2",n-1);w.setAttribute("y2", +f.barMargin+t+2.5);var q=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!=="undefined")q=b.collapsedSummaryLineClass;if(typeof q!=="undefined")w.setAttribute("class",q);else{q=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!=="undefined")q=b.collapsedSummaryLineStyle;typeof q!=="undefined"&&w.setAttribute("style",q)}h.appendChild(w)}var q=l.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-0.25,k=t+1.5,j=f.barHeight*3/4,p=f.barHeight/4,t=o-1- +f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t+j/2)+","+(w+k+p)+" "+(t+j)+","+(w+k)+" "+(t+j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&&q.setAttribute("style",D);h.appendChild(q);q=l.createElementNS("http://www.w3.org/2000/svg","polygon");t=n+f.barHeight/3;q.setAttribute("points",t+","+w+" "+t+","+(w+k)+" "+(t-j/2)+","+(w+k+p)+" "+(t-j)+","+(w+k)+" "+(t-j)+","+w);typeof u!=="undefined"&&q.setAttribute("class",u);typeof D!=="undefined"&& +q.setAttribute("style",D);h.appendChild(q);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){u=null;if(typeof f.allowCreatingStartDependencies==="undefined"||f.allowCreatingStartDependencies){u=l.createElementNS("http://www.w3.org/2000/svg","circle");u.setAttribute("cx",o-0.5);u.setAttribute("cy",f.barMargin+f.barHeight/2);u.setAttribute("r", +f.barHeight/4);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(u)}l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n-0.5);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",2.5);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,u,h,b,f.barMargin+f.barHeight/2,n-1.5,o,g,e,f)}return h}},Hb=function(a,d,c){return function(b){var e=typeof d!=="undefined"?d:b.ganttChartView,f= +typeof c!=="undefined"?c:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,h=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!=="undefined"){var o=H(b.baselineStart,f),n=l.createElementNS("http://www.w3.org/2000/svg","polygon"),t=f.barMargin-1,w=f.barHeight+1;n.setAttribute("points",o+","+t+" "+(o-w/2)+","+(t+w/2)+" "+o+","+(t+w)+" "+(o+w/2)+","+(t+w/2));o=f.baselineBarClass;if(typeof b.baselineBarClass!=="undefined")o=b.baselineBarClass;if(typeof o!=="undefined")n.setAttribute("class", +o);else{var u=f.baselineBarStyle;if(typeof b.baselineBarStyle!=="undefined")u=b.baselineBarStyle}n.setAttribute("style",u);h.appendChild(n)}n=H(b.start,f);u=l.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;t=f.barMargin;o=f.barHeight+1;u.setAttribute("points",n+","+t+" "+(n-o/2)+","+(t+o/2)+" "+n+","+(t+o)+" "+(n+o/2)+","+(t+o/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!=="undefined")t=b.milestoneBarClass;if(typeof b.barClass!=="undefined")t=b.barClass;if(typeof t!=="undefined")u.setAttribute("class", +t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!=="undefined")t=b.milestoneBarStyle;if(typeof b.barStyle!=="undefined")t=b.barStyle;typeof t!=="undefined"&&u.setAttribute("style",t)}h.appendChild(u);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly==="undefined"||!b.isReadOnly)&&(typeof b.isBarReadOnly==="undefined"||!b.isBarReadOnly)){u=l.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",n-o/2);u.setAttribute("y",f.barMargin);u.setAttribute("width",o);u.setAttribute("height", +o);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");h.appendChild(u);qb(u,null,null,null,b,n,n,n,g,e,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=l.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",n);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");h.appendChild(l);cb(l,null,h,b,f.barMargin+f.barHeight/2,n,n,g,e,f)}}return h}}, +Kb=function(a,d){return function(c,b){var e=c.ganttChartView,f=typeof d!=="undefined"?d:e.settings,g=typeof a!=="undefined"?a:e.items,l=e.ownerDocument,e=l.createElementNS("http://www.w3.org/2000/svg","g"),h;h=Ba(b.item,g,f);var o=Ba(c,g,f),g="M ",n,t,w=f.itemHeight,u=w/2,D=w/3.5,q=2,k=false,j;if(h==o&&(typeof b.dependencyType==="undefined"||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType==="undefined"|| +b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);t=H(c.start,f)}else{n=H(b.item.start,f);t=H(c.finish,f)}h=h-o+0.5;g=g+(n+" "+(h+u)+" L "+(t+(t>n?-1:1)*(w/5-1))+" "+(h+u))}else{if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled)?n=n-(w/5+0.25):b.item.isMilestone&& +(n=n-w/4);t=n-D}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled==="undefined"||b.item.isSummaryEnabled))n=n+(w/5+0.25);else if(b.item.isMilestone)n=n+w/4;else{j=H(b.item.start,f)+4-1;nD*2&&c.start>=b.item.finish)&&(o=t)}}if(typeof b.dependencyType!=="undefined"&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(o>t){h=h-D/6;h=h<=0?h+u:h-u;g=g+(" "+t+" "+(h+u))}}else if(on-q&&(q=-q);n=n-q}g=g+(" "+o+" "+h);k&&(g=g+(" "+ +n+" "+h))}h=g;g=l.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",h);typeof f.dependencyLineZoneClass!=="undefined"&&g.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!=="undefined"&&g.setAttribute("style",f.dependencyLineZoneStyle);e.appendChild(g);l=l.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",h);h=f.dependencyLineClass;if(typeof b.dependencyLineClass!=="undefined")h=b.dependencyLineClass;if(typeof h!=="undefined")l.setAttribute("class", +h);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!=="undefined")f=b.dependencyLineStyle;typeof f!=="undefined"&&l.setAttribute("style",f)}e.appendChild(l);return e}},Lb=function(a){return function(d,c){var b=d.ganttChartView.ownerDocument,e=b.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(G(b,c.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified==="undefined"||!a.areToolTipsSimplified){if(c.dependencyType){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b, +"Type: "+Zb(c.dependencyType)))}if(c.lag){e.appendChild(b.createTextNode("\n"));e.appendChild(G(b,"Lag: "+c.lag/36E5+"h"))}}return e}},Zb=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},y=function(a,d,c,b){if(typeof a.ganttChartView!=="undefined"){var e=a.ganttChartView,f=e.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!=="undefined"&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem==="undefined")a.start=M(a.start,f,true,typeof a.isMilestone!=="undefined"&&a.isMilestone,E(a));if(c)a.preferredStart=a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!=="undefined"&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem==="undefined")a.finish=M(a.finish,f,typeof a.isMilestone!=="undefined"&&a.isMilestone,true,E(a))}else if(typeof a.minFinish!=="undefined"&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(e.isTimingInformationInitialized){var g=e.items,l,h;if(d=="indentation"||d=="predecessors")for(l=0;l0&&La(h,g,f,e);h=h.parent}h=a;for(typeof h.predecessors!=="undefined"&& +h.predecessors.length>0?La(h,g,f,e):rb(h,f);h!=null;){if(typeof h.successors==="undefined"){h.successors=[];for(l=0;l0&&(h=h+", ");n=Math.floor(o.value/g*1E6)/1E6;h=h+(o.key+(n!=1?" ["+n*100+"%]":""))}e.setItemAssignmentsContent(a,h)}f.itemPropertyChangeHandler(a,d,c,b);d=="isExpanded"? +typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!=="undefined"&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!=="undefined"&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,c);typeof a.scheduleChartView!=="undefined"&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a, +d){if(typeof a.isAwaitingPreferredStartUpdates==="undefined")if(a.hasChildren&&(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))for(var c=0;cf&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!=="undefined"&&d.lag!=0&&(f=R(f,d.lag,b,E(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled))){a.finish=M(ra(f,b),b,a.isMilestone,true,E(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}c=true}}if(c&&!(typeof a.ganttChartView==="undefined"||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!=="undefined"))if(typeof a.ganttChartView!=="undefined"&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates}, +0)}}},Sa=function(a,d){if(typeof a.dependsOf!=="undefined"&&typeof a.dependsOf[a]!=="undefined")return a.dependsOf[d];try{if(a==d)return true;var c=ac(a);if(c.indexOf(d)>=0)return true;var b=ac(d);if(b.indexOf(a)>=0)return true;var e=sb(a),f,g;for(f=0;f=0||b.indexOf(g)>=0||Sa(g,d))return true}for(e=0;e=0||b.indexOf(g)>=0||Sa(g,d))return true}}var h=a.children; +for(f=0;f0&&Sa(o,d))return true}}finally{if(typeof a.dependsOf==="undefined")a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},ac=function(a){for(var d=[];typeof a.parent!=="undefined"&&a.parent!=null;){(typeof a.isSummaryEnabled==="undefined"||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d=[];if(typeof a.predecessors!=="undefined"&&a.predecessors!=null)for(var c= +0;cg||!b&&a==g)if(b)a=g;else{e=ba(e); +a=f}for(b=ma(e);bh||Rb(e,d);){if(c){b++;e=ba(e);a=f}else{b--;e=Ma(e);a=g}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(e.valueOf()+a)},L=function(a,d,c,b){if(d.valueOf()=f){h=ba(h);a=e}for(var o=Y(d);h=g&&(n<=l&&!Rb(h,b))&&(c=c+(f-a));h=ba(h);a=e}d=ka(d);df&&(d=f);d>a&&(c=c+(d-a));return c},R=function(a,d,c,b){if(d<0)return Ta(-d, +a,c,b);a=M(a,c,true,false,b);if(d==0)return a;var e=typeof b!=="undefined"&&typeof b.workingDayStart!=="undefined"?b.workingDayStart:c.visibleDayStart,f=typeof b!=="undefined"&&typeof b.workingDayFinish!=="undefined"?b.workingDayFinish:c.visibleDayFinish,g=ka(a);if(g+d0;){a=ka(a)>0?M(ba(Y(a)),c,true,false,b):M(Y(a),c,true,false,b);if(e+de)return new Date(d.valueOf()-a);g=g-e;d=new Date(d.valueOf()-g);for(a=a-g;a>0;){d=ka(d)<864E5?M(Y(d),c,false,true,b):M(Ma(Y(d)),c,false,true,b);if(f-a>e)return new Date(d.valueOf()-a);g=f-e; +d=new Date(d.valueOf()-g);a=a-g}return new Date(d.valueOf())},db=function(a,d,c,b,e){return L(a,d,b,e)/L(a,c,b,e)},cc=function(a,d,c,b,e){return R(a,d*L(a,c,b,e),b,e)},Ua=function(a){for(var d=0,a=ha(a),c=0;cc){b=f.key;c=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=aa(a.settings.resourceSchedules,b);return b< +0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,c,b,e,f,g,l,h,o,n){var t;a.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="Start";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;o.draggingInitialFinishPosition=g;o.draggingInitialCompletedFinishPosition=l;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(a))|| +(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+ +" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.originalX=t.x;o.toolTip=t}}},true);d!=null&&d.addEventListener("mousedown",function(b){if(b.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="StartOnly";o.style.cursor=a.style.cursor;o.draggingInitialX=b.clientX;o.draggingInitialStartPosition=f;b.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;o.toolTip=t}}},true);c!=null&&c.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem= +e;o.dragType="Finish";o.style.cursor=c.style.cursor;o.draggingInitialX=a.clientX;o.draggingInitialFinishPosition=g;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(c))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,c,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;o.toolTip=t}}},true);b!=null&&b.addEventListener("mousedown",function(a){if(a.button==0){o.isDuringTimeDragOperation=true;o.draggingItem=e;o.dragType="CompletedFinish";o.style.cursor=b.style.cursor;o.draggingInitialX=a.clientX; +o.draggingInitialCompletedFinishPosition=l;a.preventDefault();if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +a=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(a)){t.setContent(Math.round(a*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;o.toolTip=t}}}},true);if(typeof o.draggableItems==="undefined")o.draggableItems=[];for(var w=false,u=0;ue.finish)b=e.finish;e.start=b;e.preferredStart=e.start;y(e,"start",true, +false);if(o.dragType!="StartOnly"){if(e.isMilestone){e.finish=e.start;y(e,"finish",false,false);e.completedFinish=e.start}else{e.finish=R(e.start,c,n,E(e));y(e,"finish",false,false);e.completedFinish=R(e.start,a,n,E(e))}y(e,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent(n.dateTimeFormatter(N(e.start))+" \u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.start,n)-o.draggingInitialStartPosition))}}else{if(e.finish< +e.start){e.finish=e.start;y(e,"finish",false,false)}if(e.completedFinishc){e.completedFinish=c;y(e,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;t.setContent("\u2013 "+n.dateTimeFormatter(N(e.finish)));t.setHorizontalPosition(t.originalX+(H(e.finish,n)-o.draggingInitialFinishPosition))}Va(e,h,o.chartContent,n)}else if(o.dragType=="CompletedFinish"){c=M(ra(Fa(o.draggingInitialCompletedFinishPosition+b,n),n),n,e.isMilestone,true, +E(e));if(ce.finish)c=e.finish;if(c.valueOf()!=e.completedFinish.valueOf()){e.completedFinish=c;y(e,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips){t=o.toolTip;c=db(e.start,e.completedFinish,e.finish,n,E(e));if(!isNaN(c)){t.setContent(Math.round(c*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(H(e.completedFinish,n)-o.draggingInitialCompletedFinishPosition))}}Va(e,h,o.chartContent,n)}o.draggingItem=e;o.draggingPerformed=true}},true);document.addEventListener("mouseup", +function(a){if(!(a.button!=0||typeof o.draggingItem==="undefined"||o.draggingItem!=e||o.dragType!="Start"&&o.dragType!="StartOnly"&&o.dragType!="Finish"&&o.dragType!="CompletedFinish")){delete o.isDuringTimeDragOperation;a=o.draggingItem;o.style.cursor="default";if(o.draggingPerformed){if(o.dragType=="Start"||o.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(o.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else o.dragType== +"CompletedFinish"&&y(a,"completedFinish",true,true);delete o.draggingPerformed}delete o.draggingItem}},true);o.draggableItems.push(e)}},cb=function(a,d,c,b,e,f,g,l,h,o){var n=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Finish";h.style.cursor=a.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=f;h.draggingInitialTopPosition= +e;h.draggingInitialFinishPosition=f;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);d!=null&&d.addEventListener("mousedown",function(c){if(c.button==0){delete h.cancelDrag;h.draggingItem=b;h.dragType="Dependency";h.dragDependencyType="Start";h.style.cursor=a.style.cursor; +h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialRightPosition=g;h.draggingInitialTopPosition=e;h.draggingInitialFinishPosition=g;h.draggingInitialThumbPosition=e;c.preventDefault();if(DlhSoft.Controls.ToolTip&&o.useUpdatingToolTips){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ o.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;h.toolTip=toolTip}}},true);a.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!== "undefined"){var b=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof b.originalStyle==="undefined")return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){a.mouseOver=true;h.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&a.setAttribute("class",o.dependencyPointerClass);typeof o.dependencyPointerStyle!=="undefined"&&a.setAttribute("style",o.dependencyPointerStyle); a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof h.temporaryHoveringThumb!=="undefined"){var a=h.temporaryHoveringThumb;delete h.temporaryHoveringThumb;if(typeof a.originalStyle==="undefined")return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof h.temporaryDependencyLine==="undefined"){d.mouseOver=true;h.temporaryHoveringThumb=d;d.originalStyle=d.getAttribute("style");typeof o.dependencyPointerClass!=="undefined"&&d.setAttribute("class", diff --git a/GanttChartHyperLibraryDemos/Demos/packages.config b/GanttChartHyperLibraryDemos/Demos/packages.config index 021f8f60c..02a944264 100644 --- a/GanttChartHyperLibraryDemos/Demos/packages.config +++ b/GanttChartHyperLibraryDemos/Demos/packages.config @@ -1,7 +1,7 @@  - +